#!usr/bin/env python  
# -*- coding:utf-8 -*-
""" 
@author:robot
@file: title04分奖金.py 
@version:
@time: 2023/05/31

https://dream.blog.csdn.net/article/details/128995024

3
2 10 3


8 10 3

"""
n = int(input().strip())
rands = list(map(int, input().strip().split()))


def solve_method(rands):
    for i in range(len(rands)):
        ran = rands[i]
        find = False
        for j in range(i, len(rands)):
            other = rands[j]
            if other > ran:
                print((j - i) * (other - ran), end=" ")
                find = True
                break
        if not find:
            print(ran, end=" ")


solve_method(rands)
